using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using App.DAL;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace App.Pages
{
    public class FormModel : PageModel
    { 
        DAL.AppContext appContext;
        public FormModel(DAL.AppContext appContext)
        {

            this.appContext = appContext;
        }
        public void OnGet()
        { 
            SysUser user = new SysUser();
            user.CreateDt = DateTime.Now;
            user.Account = "SChW";
            appContext.SysUsers.Add(user);
            appContext.SaveChanges();
        }
    }
}
